package cn.myjerry.others.en;

import java.util.Enumeration;
import java.util.Vector;

/**
 * Enumeration的使用
 * hasMoreElements => 判断
 * nextElement => 获取
 * @author Jerry
 *
 */

public class Demo01 {
	public static void main(String[] args) {
		Vector<String> vector = new Vector<String>();
		vector.add("java");
		vector.add("HTML");
		vector.add("c++");
		
		//遍历该容器
		Enumeration<String> en = vector.elements();
		while(en.hasMoreElements()){
			System.out.println(en.nextElement());
		}
	}
}
